package errhelp

import (
	"os"
	"wolongauth/global"
)

func ErrDoWithTag(err error, tag string) bool {
	if err != nil {
		global.Logger.Error("[", tag, "]", err.Error())
		return false
	}
	return true
}

func ErrDoWithTagAndAbort(err error, tag string) {
	if !ErrDoWithTag(err, tag) {
		os.Exit(1)
	}
}
